#!/bin/sh

# 复制项目的文件到对应docker路径，便于一键生成镜像。
usage() {
	echo "Usage: sh copy.sh"
	exit 1
}


# copy sql
#echo "begin copy sql "
#cp ../sql/ry_20230706.sql ./mysql/db
#cp ../sql/ry_config_20220929.sql ./mysql/db

# copy html
#echo "begin copy html "
#cp -r ../ruoyi-ui/dist/** ./nginx/html/dist

root_path=`pwd`

# copy jar
echo "begin copy ruoyi-gateway "
cp ${root_path}/ruoyi-gateway/target/ruoyi-gateway.jar ${root_path}/docker/ruoyi/gateway/jar/ruoyi-gateway.jar

echo "begin copy ruoyi-auth "
cp ${root_path}/ruoyi-auth/target/ruoyi-auth.jar ${root_path}/docker/ruoyi/auth/jar/ruoyi-auth.jar

echo "begin copy ruoyi-visual "
cp ${root_path}/ruoyi-visual/ruoyi-monitor/target/ruoyi-visual-monitor.jar  ${root_path}/docker/ruoyi/visual/monitor/jar/ruoyi-visual-monitor.jar

echo "begin copy ruoyi-modules-system "
cp ${root_path}/ruoyi-modules/ruoyi-system/target/ruoyi-modules-system.jar ${root_path}/docker/ruoyi/modules/system/jar/ruoyi-modules-system.jar

echo "begin copy ruoyi-modules-file "
cp ${root_path}/ruoyi-modules/ruoyi-file/target/ruoyi-modules-file.jar ${root_path}/docker/ruoyi/modules/file/jar/ruoyi-modules-file.jar

echo "begin copy ruoyi-modules-job "
cp ${root_path}/ruoyi-modules/ruoyi-job/target/ruoyi-modules-job.jar ${root_path}/docker/ruoyi/modules/job/jar/ruoyi-modules-job.jar

echo "begin copy ruoyi-modules-gen "
cp ${root_path}/ruoyi-modules/ruoyi-gen/target/ruoyi-modules-gen.jar ${root_path}/docker/ruoyi/modules/gen/jar/ruoyi-modules-gen.jar

